package teamproject.visualization.gui;

import java.util.ArrayList;

import teamproject.visualization.gui.behaviors.Resettable;

public class BehaviorContainer {

	private static BehaviorContainer instance = new BehaviorContainer();

	public static BehaviorContainer getInstance() {
		return instance;
	}

	private ArrayList<Resettable> list = new ArrayList<Resettable>();

	private BehaviorContainer() {
	}

	public void add(Resettable resettable) {
		list.add(resettable);
	}

	public void reset() {

		list.removeAll(list);
		instance.list.removeAll(instance.list);
	}

	public void resetBehaviors() {
		for (Resettable res : list) {
			res.reset();
		}
	}
}
